// 维易API接口集合
import req from './axios'
const $API = 'http://gfapi.vephp.com'
import CONFIG from '../../config/config.config'; // CONFIG

// 根据淘口令/商品ID查询商品淘口令
const getTkl = data => req.get(
  `${$API}/hcapi`,
  {
    ...data,
    vekey: CONFIG.vekey,
  }
);

// 热销高佣产品
const hotProducts = data => req.get(
  `${$API}/products`,
  {
    ...data,
    vekey: CONFIG.vekey,
  }
);

// 超级搜索接口
const superSearch = data => req.get(
  `${$API}/super`,
  {
    ...data,
    vekey: CONFIG.vekey,
  }
);

// 根据商品ID判断淘礼金高佣金CPS类型
const cashgiftType = data => req.get(
  `${$API}/commtype`,
  {
    ...data,
    vekey: CONFIG.vekey,
  }
);

// 查询淘宝客后台订单
const orderDetail = data => req.get(
  `${$API}/orderdetails`,
  {
    ...data,
    vekey: CONFIG.vekey,
  }
);

// 猜你喜欢
const guessLike = data => req.get(
  `${$API}/guesslike`,
  {
    ...data,
    vekey: CONFIG.vekey,
  }
);

export default {
  getTkl,
  hotProducts,
  superSearch,
  cashgiftType,
  orderDetail,
  guessLike,
}